let obj = {
    name: '晏总',
    age: 18,
    like: {
        n: '骑车'
    }
}
function deepClone(obj) {
    let newObj= Array.isArray(obj) ? [] : {};
    for (let key in obj) {
        if (obj.hasOwnProperty(key)) {
            if (typeof obj[key] === 'object' && obj[key] !== null) {
                newObj[key] = deepClone(obj[key])
            }
            else {
                newObj[key] = obj[key]
            }
        }
    }
    return newObj
}
console.log(deepClone(obj));
obj.like.n = '泡脚'


